1. Field of the Invention
The present invention relates to an edge detection bias correction value calculation method, an edge detection bias correction method, and a program correcting detection bias that occurs during edge detection on an image measuring machine.
2. Description of Related Art
The image measuring machine uses a CCD camera to capture an image of a work piece (measured object) through a field lens, then performs measurement of a shape, dimensions, or the like of the work piece based on the captured image by detecting edges (boundaries between light and dark) at a plurality of locations. Detection of an edge is typically performed by displaying an edge detection tool showing a detection range superimposed on the image of the work piece captured by an operation by a user. The tool includes various forms matched to the form of the work piece and nature of the measurement. These may include a straight line tool such as that shown in FIG. 11A, a rectangular tool such as that shown in FIG. 11B, and the like. In any case, a tool 22 is displayed on a work piece image 21, and an edge 23 is detected by searching image data in a direction of an arrow symbol. Specifically, a grayscale in the tool is read and a boundary between light and dark is identified by a predetermined algorithm, and the identified boundary between light and dark is detected as the edge.
However, in the image measuring machine, an error such as distortion is included in the image data captured by the CCD camera due to an aberration in a lens or inclination of the camera, and accurate detection of the position of the edge is compromised by the presence of the error. In order to correct such an error, typically a field-of-view correction process is performed on the image data, such as those disclosed in Japanese Patent Laid-open Publication No. 2005-004391 and Japanese Patent No. 5,412,757, for example.
By performing the field-of-view correction process, the error in the image data caused by the lens aberration, camera inclination, or the like is corrected. However, even when the corrected image data is used, a slight error remains in the detected position of the edge, caused by the edge detection algorithm or the like. In addition, a magnitude of the error varies depending on optical settings such as type of illumination, resolution, or type/individual differences of lenses, and on differences in the detected position of the edge within a field-of-view of image acquisition.